package org.gas.barapraja.admin.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public abstract class AppContext {
	
	public static final String ACCOUNT_DAO="accountDao";
	
	public static final String TOKEN_DAO="tokenDao";
	
	public final static String MESSAGE_DAO="messageDao";
        
        public final static String CHANEL_DAO="chanelDao";
		
	public final static String SPRING_CONFIG_DAO="classpath:applicationContext-jpa.xml";	
		
	private static ApplicationContext context;
	
	public static Object getGasDAOBeans(String springBeansName)
	{
		if(context==null)
			context=new ClassPathXmlApplicationContext(SPRING_CONFIG_DAO);
		return context.getBean(springBeansName);
	}		
	
}
